<%@page import="java.util.List"%>
<%@page import="com.cositas.dulces.lp.ApplicationFacade"%>
<%@page import="com.cositas.dulces.lp.model.ShoppingCart"%>
<%@page import="com.cositas.dulces.lp.model.Product"%>
<%@page import="com.cositas.dulces.lp.products.Products"%>
<%@ include file="include/facebookdata.jsp" %>
<% String thisPage = "checkout.jsp";%>
<html>
<head> 
<title>Pedido</title>
<link rel="stylesheet" type="text/css" href="css/main.css"/>
<link rel="stylesheet" type="text/css" href="css/jquery-ui-1.8.20.custom.css"/>
<script type='text/javascript' src='js/jquery-1.7.min.js'></script>
<script type='text/javascript' src='js/jquery-ui-1.8.20.custom.min.js'></script>
<script type='text/javascript' src='js/jquery-ui-timepicker-addon.js'></script>

<script>
$(document).ready(
	function(){

			$("#date").datetimepicker({dateFormat: 'dd-mm-yy', timeFormat: "hh:mm", changeMonth: true,
				changeYear: true, yearRange: "1900:2020"});

	}	
);

</script>
<div style="width: 100%; height: 40px; background-image: url(img/bgtop.jpg); text-align: center; vertical-align: middle;"><h1>Pedidos Online</h1></div>
<div style="width: 100%; background-image: url(img/pink_gradient.jpg); background-repeat: repeat-x;">
<table width="100%" border="1">
	<tr>
		<td width="100%">
			<div style="height: 500px; overflow-y: auto; position: relative; top: 0px; border: 1px Solid Black;">

				<% List<String> errors = (List<String>)request.getAttribute("errors");
					if (errors != null && !errors.isEmpty()) { 
						for (String err : errors) { %>
						<span style="color: Red;;"><%=err%></span><br>
				<% 		}
				} %>
				<form action="./controller?action=placeorder" method="POST">
				<input type="hidden" size="10" name="fbid" value="<%=fbid %>">
				<table>
					<tr>
						<td colspan="2">Pedido</td>
					</tr>
					<tr>
						<td>Fecha de entrega:</td>
						<td><input type="text" size="10" id="date" name="date" placeholder="fecha" value="<%=request.getParameter("date") == null ? "" : request.getParameter("date") %>" style="width: 150px;"></td>
					</tr>
					<tr>
						<td>Direccion de entrega:</td>
						<td><input type="text" size="10" name="address" placeholder="direccion" value="<%=request.getParameter("address") == null ? "" : request.getParameter("address") %>" style="width: 150px;"></td>
					</tr>
					<tr>
						<td>Email:</td>
						<td><input type="text" size="10" name="email" placeholder="email" value="<%=request.getParameter("email") == null ? "" : request.getParameter("email") %>" style="width: 150px;"></td>
					</tr>
					<tr>
						<td>Telefono:</td>
						<td><input type="text" size="10" name="phone" placeholder="telefono" value="<%=request.getParameter("phone") == null ? "" : request.getParameter("phone") %>" style="width: 150px;"></td>
					</tr>
					<tr>
						<td colspan="2"><input type="submit" value="Confirmar pedido"></td>
					</tr>
				</table> 
				</form>
		
			</div>
		</td>
		<td valign="top" style="width: 280px;"><%@ include file="include/shoppingcart.jsp" %></td>
	</tr>
</table>
</div>
</body>
</html>